/*
	Find the smallest possible value of the largest area triangle in a triangulation
	Sol: Dynamic Programming
*/

#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <algorithm>

#define oo 1000000000

using namespace std;

struct point {
	int x, y;
};

point p[100];
int np;

int d[50][60];	// d[i][j] = the area of the largest triangle with vertices from i to j
bool valid[50][60];


int direction(point p0, point p1, point p2)
{
	return (p1.x-p0.x)*(p2.y-p0.y) - (p2.x-p0.x)*(p1.y-p0.y);
}

int area(point p0, point p1, point p2)
{
	return abs(direction(p0, p1, p2));
}

bool cut(point p1, point p2, point p3, point p4)
{
	int d1 = direction(p1, p2, p3);
	int d2 = direction(p1, p2, p4);
	int d3 = direction(p3, p4, p1);
	int d4 = direction(p3, p4, p2);
	return (((d1 > 0 && d2 < 0) || (d1 < 0 && d2 > 0)) && ((d3 > 0 && d4 < 0) || (d3 < 0 && d4 > 0)));
}

bool intersect(int st, int ed)	// if (p[st], p[ed]) crosses any polygon edge then reject
{	
	int v = st+1;	// note that st < ed
	while (v+1 != ed)
	{
		if (cut(p[v], p[v+1], p[st], p[ed])) return true;
		v++;
	}
	
	v = (ed+1)%np;
	int vn = (v+1)%np;
	while (vn != st)
	{
		if (cut(p[v], p[vn], p[st], p[ed])) return true;
		v = vn;
		vn = (vn+1)%np;
	}

	return false;
}

bool oneside(int st, int ed)	// if the segment of (p[st], p[ed) lies on one side of the polygon then reject
{
	if (st == 0 && ed == np-1) return false;

	bool pos = false, neg = false;
	for (int i = 0; i < np; i++) 
	{
		int d = direction(p[st], p[ed], p[i]);
		if (d < 0) neg = true; else
		if (d > 0) pos = true;
	}
	if (neg && pos) return false;
	
	return true;
}

int max3(int a, int b, int c)
{
	int t = a;
	if (t < b) t = b;
	if (t < c) t = c;
	return t;
}

int main()
{
	int ntest;
	cin >> ntest;
	while (ntest-- > 0){
		cin >> np;
		for (int i = 0; i < np; i++) cin >> p[i].x >> p[i].y;
		
		for (int i = 0; i < np; i++)
		for (int j = i; j < np; j++) 
			if (j-i <= 1) d[i][j] = -1;
			else d[i][j] = oo;
		
		memset(valid, true, sizeof(valid));
		for (int len = 2; len <= np-1; len++)
			for (int st = 0; st+len < np; st++)
			{
				int ed = st+len;
				
				if (intersect(st, ed) || oneside(st, ed)){
					valid[st][ed] = false;
					continue;
				}
				
				for (int mid = st+1; mid <= ed-1; mid++)
					if (valid[st][mid] && valid[mid][ed]) 
						d[st][ed] = min(d[st][ed], max3(area(p[st], p[mid], p[ed]), d[st][mid], d[mid][ed]));
			}

		if (d[0][np-1] % 2 == 0) cout << d[0][np-1]/2 << ".0" << endl;
		else cout << d[0][np-1]/2 << ".5" << endl;
	}
	return 0;
}

